<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/10/31 0031
 * Time: 上午 11:24
 */

namespace app\api\service;

use app\common\service\Service;
use Yansongda\Pay\Pay;
use Yansongda\Pay\Log;

class WxPay extends Service
{
    public function pay($out_trade_no,$total_fee,$body)
    {
        $order = [
            'out_trade_no' => $out_trade_no,
            'total_fee' => $total_fee, // **单位：分**
            'body' => $body,
        ];
        $pay = Pay::wechat(config('wechat.wx_pay1'))->wap($order);
        return $pay->send();
    }

}